
import {simpleServer} from '@/tools/servers'

/**
 * 评价
 */
export class EvaluationService {
    // 分页查询列表
    static findEvaluations (pageDTO) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.findEvaluations,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/findEvaluations', body);
    }


    //根据评价Id查询评价
    static findEvaluation (evaluationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findEvaluation ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/findEvaluation',body);
    }

    //为了编辑,根据评价Id查询评价
    static findEvaluationForEdit(evaluationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findEvaluationForEdit ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/findEvaluationForEdit',body);
    }

    //为了查看,根据评价Id查询评价，所有外键字段的名称都已加载
    static findEvaluationForView(evaluationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findEvaluationForView ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/findEvaluationForView',body);
    }

    //创建新的评价
    static createEvaluation() {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.createEvaluation,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/createEvaluation',body);
    }

    //保存评价
    static saveEvaluation(evaluation) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.saveEvaluation,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/saveEvaluation', body);
    }

    //编辑评价
    static updateEvaluation (evaluation) {
        var httpMethod = 'POST';
        var body = simpleServer.getArgs(this.updateEvaluation,arguments,'POST');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/updateEvaluation', body);
    }

    //根据评价Id删除评价
    static deleteEvaluation (evaluationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.deleteEvaluation,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/deleteEvaluation',body);
    }

    //为了查看,根据评价Id查询评价，只加载ID 和 名称
    static findEvaluationsWithIdNameById(evaluationId) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findEvaluationsWithIdNameById ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/findEvaluationsWithIdNameById',body);
    }

    //为了查看,根据评价 名称 查询评价，只加载ID 和 名称
    static findEvaluationsWithIdNameByName(evaluationName) {
        var httpMethod = 'GET';
        var body = simpleServer.getArgs(this.findEvaluationsWithIdNameByName ,arguments,'GET');
        return simpleServer.connection(httpMethod, '/simple/evaluation/Evaluation/findEvaluationsWithIdNameByName',body);
    }


}
